
const TextureShader ={
    vetexShader : `
    varying vec2 vUv;

    void main() {
        vUv = uv;
        gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );

    }
   `,
   
    fragmentShader: `
    varying vec2 vUv;
    uniform vec2 uvScale;
    uniform float time;
    uniform sampler2D colorTexture;

    void main() {
        vec2 newT =  uvScale * vUv + vec2(-10,0.0) * time;
        if(1.0 - step(0.0,vUv.x-time)==0.0)
        {
            gl_FragColor = vec4(0.5,0.5,0.5,0.1);
        }
        else{
            gl_FragColor = texture2D( colorTexture, newT );
        }
    }`}
   
   export {TextureShader}
   
   
   
   